angular.module("myApp")
.controller("travelController",["$scope","travelService",
    function($scope,travelService){
        travelService.getData().success(function(data){
            $scope.data = data;
        })
}])
.controller("travelStyle",["$scope",function($scope){
	var travelUl = document.getElementsByClassName('travel_tabNav')[0],
	hotcon = document.getElementsByClassName("travel_hot_cont")[0],
	week = document.getElementsByClassName("travel_week")[0];
	for(var i = 0; i< travelUl.children.length; i++) {
		travelUl.children[i].onclick = function(e){
			e = e || window.event;
			for(var j = 0; j< travelUl.children.length; j++) {
				travelUl.children[j].className = "";
			};
			this.className = "changecolor";
			if (this === travelUl.children[0]) {
				hotcon.style.display = "block";
				week.style.display = "none";
				travelUl.children[0].children[0].style.display = "block";
				travelUl.children[1].children[0].style.display = "none";
			}else{
				hotcon.style.display = "none";
				week.style.display = "block";
				travelUl.children[0].children[0].style.display = "none";
				travelUl.children[1].children[0].style.display = "block";
			}
		}
	}
}])